<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<head>
<title>Login</title>
</head>

<body>
	<f:view>
		<fieldset>
			<legend>Login form</legend>
			<h:form>
				<h:panelGrid columns="2">
					<h:outputLabel value="User Name" for="j_username" />
					<h:inputText id="j_username" value="#{loginBean.username}" required="true">
						<f:validator validatorId="usernameValidator" />
					</h:inputText>
					<h:outputLabel value="Password" for="j_password" />
					<h:inputSecret id="j_password" value="#{loginBean.password}" required="true" />
				</h:panelGrid>
				<h:commandButton action="#{loginBean.doLogin}" value="Login" />
				<h:messages style="color: red;" />
			</h:form>
		</fieldset>
	</f:view>
</body>
</html>

